package com.tbit.uqbike.object.pojo;

import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * usermsg
 *
 * @author
 */
@Data
@Accessors(chain = true)
public class Usermsg implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 消息id
     */
    private Integer usermsgid;
    /**
     * 消息类型
     */
    private Integer msgtype;
    /**
     * 用户id
     */
    private Integer userid;
    /**
     * 创建时间
     */
    private Date createtime;
    /**
     * 阅读时间
     */
    private Date readtime;
    /**
     * 消息状态（1：已处理，0：未处理）
     */
    private Integer msgstate;
    /**
     * 标题
     */
    private String title;
    /**
     * 内容
     */
    private String content;
    /**
     * 链接
     */
    private String linkurl;
    /**
     * 备注
     */
    private String remark;

    public Usermsg() {
    }

    public Usermsg(Integer usermsgid, Integer msgtype, Integer userid, Date createtime, Date readtime, Integer msgstate, String title, String content, String linkurl, String remark) {
        this.usermsgid = usermsgid;
        this.msgtype = msgtype;
        this.userid = userid;
        this.createtime = createtime;
        this.readtime = readtime;
        this.msgstate = msgstate;
        this.title = title;
        this.content = content;
        this.linkurl = linkurl;
        this.remark = remark;
    }

    public Usermsg(Integer userid, String title, String content) {
        this.userid = userid;
        this.title = title;
        this.content = content;
        this.createtime = new Date();
        this.msgtype = 0;
        this.msgstate = 0;
    }
}